//
// Source code recreated from a .class file by IntelliJ IDEA
// (powered by Fernflower decompiler)
//

package objects;

import common.GlobalID;

public class ExtensionMaterialsEntry implements IEntryToSellOrBuy, IUnlockLevel, IGlobalIDName {
  private final String Name;
  private final Integer UnlockLevel;
  private final Integer DumbValue;
  private final Integer DiamondPrice;
  private final Integer ReputationUnlockLevel;
  private Integer instanceId;
  private Integer materialGlobalId;

  public ExtensionMaterialsEntry(String Name, Integer UnlockLevel, Integer DumbValue, Integer DiamondPrice, Integer ReputationUnlockLevel) {
    this.Name = Name;
    this.UnlockLevel = UnlockLevel;
    this.DumbValue = DumbValue;
    this.DiamondPrice = DiamondPrice;
    this.ReputationUnlockLevel = ReputationUnlockLevel;
  }

  public String getName() {
    return this.Name;
  }

  public Integer getGlobalID() {
    return this.materialGlobalId;
  }

  public void setGlobalID(Integer materialGlobalId) {
    this.materialGlobalId = materialGlobalId;
    this.instanceId = Integer.valueOf(GlobalID.getInstanceID(materialGlobalId.intValue()));
  }

  public Integer getDefaultPrice() {
    return this.DumbValue;
  }

  public Integer getDiamondPrice() {
    return this.DiamondPrice;
  }

  public Integer getUnlockLevel() {
    return this.UnlockLevel;
  }

  public Integer getReputationUnlockLevel() {
    return this.ReputationUnlockLevel;
  }

  public String toString() {
    return this.getName() + ":" + this.DumbValue;
  }

  public Integer getGlobalID(Integer objectClass) {
    return Integer.valueOf(GlobalID.create(objectClass.intValue(), this.instanceId.intValue()));
  }
}
